//
//  KKImageLibrary.h
//  KKImagePickerController
//
//  Created by Mac mini on 16/1/21.
//  Copyright © 2016年 JuniorCodingPerson. All rights reserved.
//

#import "KKImagePickerManager+Tools.h"

typedef void(^KKImageLibraryManagerAllGroupsHandle)(NSArray *groups);
typedef void(^KKImageLibraryManagerAllItemsOfGroupHandle)(NSArray *items);

@interface KKImageLibraryManager : NSObject

+ (instancetype)kk_defaultManager;

- (void)kk_searchAllGroupsFromLibrary:(KKImageLibraryManagerAllGroupsHandle)handle;

- (void)kk_searchAllItemsFromLibraryWithGroup:(id)group result:(KKImageLibraryManagerAllItemsOfGroupHandle)handle;

@end

//  相片组
@interface KKImageLibraryGroupItem : NSObject

@property (nonatomic, strong) ALAssetsGroup *kk_assetsGroup;    //ios7之前

@property (nonatomic, strong) UIImage *kk_posterImage;
@property (nonatomic, strong) NSString *kk_groupName;
@property (nonatomic, assign) NSInteger kk_count;

- (instancetype)initWithAssetsGroup:(ALAssetsGroup *)assetsGroup;


@property (nonatomic, strong) PHAssetCollection *kk_assetCollection;
- (instancetype)initWithAssetCollection:(PHAssetCollection *)assetCollection withItemCounts:(NSInteger)counts;

@end


@interface KKImageItem : NSObject

@property (nonatomic, strong) UIImage *thumbImage;

@property (nonatomic, strong) ALAsset *asset_7;   /**<iOS8以下支持*/
@property (nonatomic, strong) PHAsset *asset_8;   /**<iOS8以下支持*/

@end
